<div class="container">
	<div class="box">
		<h2 class="box-title">ĐĂNG KÝ TÀI KHOẢN THÀNH VIÊN</h2>
		<div class="box-content">
			<div id="signup" class="box-signup-type">
				<?php $form = $this->beginWidget('CActiveForm', array(
					'id'=>'member-form',
					'enableAjaxValidation'=>true,
					'enableClientValidation' => true,
					'htmlOptions' => array(
						'class' => "form-horizontal"
					)
				)); ?>
				<fieldset>
					<legend> <i class="icon-key"></i> Thông tin đăng nhập</legend>
						<div class="control-group">
							<?php echo $form->labelEx($model,'email',array('class' => 'control-label')); ?>
							<div class="controls">
								<?php echo $form->textField($model,'email',array('class' => 'span4','placeholder' => 'địa chỉ email của bạn')); ?>
								<?php echo $form->error($model,'email'); ?>
							</div>
						</div>

						<div class="control-group">
							<?php echo $form->labelEx($model,'password',array('class' => 'control-label')); ?>
							<div class="controls">
								<?php echo $form->passwordField($model,'password',array('class' => 'span4','placeholder' => 'nhập mật khẩu')); ?>
								<?php echo $form->error($model,'password'); ?>
							</div>
						</div>

						<div class="control-group">
							<?php echo $form->labelEx($model,'re_password',array('class' => 'control-label')); ?>
							<div class="controls">
								<?php echo $form->passwordField($model,'re_password',array('class' => 'span4','placeholder' => 'nhập lại mật khẩu')); ?>
								<?php echo $form->error($model,'re_password'); ?>
							</div>
						</div>
				</fieldset>

				<fieldset>
					<legend> <i class="icon-user"></i> Thông tin khách hàng</legend>
						<div class="control-group">
							<?php echo $form->labelEx($model,'full_name',array('class' => 'control-label')); ?>
							<div class="controls">
								<?php echo $form->textField($model,'full_name',array('class' => 'span4','placeholder' => 'Họ tên khách hàng')); ?>
								<?php echo $form->error($model,'full_name'); ?>
							</div>
						</div>

						<div class="control-group">
							<?php echo $form->labelEx($model,'birthday',array('class' => 'control-label')); ?>
							<div class="controls">
								<div class="input-append">
								<?php
									$this->widget('zii.widgets.jui.CJuiDatePicker', array(
									    'name'=>'birthday',
									    'model' => $model,
									    'attribute' => 'birthday',
									    // additional javascript options for the date picker plugin
									    'options'=>array(
									        'maxDate' => 'today',
									        'dateFormat' => 'dd/mm/yy',
									        "changeMonth" =>  true,
								            "changeYear" => true,
								            "autoSize" => true,
								            "yearRange" => "1970:".date('Y'),
									    ),
									    'language' => 'vi',
									    'htmlOptions'=>array(
									        'style'=>'height:30px',
									        'placeholder' => 'click chọn ngày sinh',
									    ),
									));
									?>
								  <span class="add-on" style="height: 30px"><i style="font-size: 30px;display:block;padding-top:7px;" class="icon-calendar"></i></span>
								</div>
								<?php echo $form->error($model,'birthday'); ?> 
							</div>

						</div>

						<div class="control-group">
							<?php echo $form->labelEx($model,'gender',array('class' => 'control-label')); ?>
							<div class="controls">
								<?php echo $form->radioButtonList($model,'gender',Customer::model()->listGender(),array('template' => '<div class="pull-left" style="overflow:auto;margin-right:20px;"><div class="pull-left" style="margin-right:5px;">{label}</div><div class="pull-left">{input}</div></div>','separator' => '&nbsp;')); ?>
								<?php echo $form->error($model,'gender'); ?>
							</div>
						</div>

						<div class="control-group">
							<?php echo $form->labelEx($model,'location_id',array('class' => 'control-label')); ?>
							<div class="controls">
								<?php echo $form->dropDownList($model,"location_id",Location::model()->loadAllTinhThanh(),array());?>
								<?php echo $form->error($model,'location_id'); ?>
							</div>
						</div>

						<div class="control-group">
							<?php echo $form->labelEx($model,'address',array('class' => 'control-label')); ?>
							<div class="controls">
								<?php echo $form->textField($model,'address',array('class' => 'span4','placeholder' => 'Địa chỉ khách hàng')); ?>
								<?php echo $form->error($model,'address'); ?>
							</div>
						</div>

						<div class="control-group">
							<?php echo $form->labelEx($model,'mobile',array('class' => 'control-label')); ?>
							<div class="controls">
								<?php echo $form->textField($model,'mobile',array('class' => 'span4','placeholder' => 'Số điện thoại di động')); ?>
								<?php echo $form->error($model,'mobile'); ?>
							</div>
						</div>

						<div class="control-group">
							<?php echo $form->labelEx($model,'landline',array('class' => 'control-label')); ?>
							<div class="controls">
								<?php echo $form->textField($model,'landline',array('class' => 'span4','placeholder' => 'Số điện thoại bàn (nếu có)')); ?>
								<?php echo $form->error($model,'landline'); ?>
							</div>
						</div>

						<div class="control-group">
							<div class="controls">
								
							</div>
						</div>
						<div class="control-group">
							<?php echo $form->labelEx($model,'verifyCode',array('class' => 'control-label')); ?>
							<div class="controls">
								<?php $this->widget('CCaptcha',array(
									'buttonLabel' => 'lấy mã mới'
								)); ?>
								<?php echo $form->textField($model,'verifyCode',array('class' => 'span4','placeholder' => 'Nhập mã bảo mật')); ?>
								<?php echo $form->error($model,'verifyCode'); ?>
							</div>
						</div>

						<div class="control-group">
							<div class="controls">
								<?php echo $form->checkBox($model,'subcriberEmail',array()); ?>
									Nhận thông báo deals mỗi ngày qua Email
								<?php echo $form->error($model,'subcriberEmail'); ?>
							</div>
						</div>

						<div class="control-group">
							<div class="controls">
								<?php echo $form->checkBox($model,'acceptRule',array()); ?>
								Đồng ý với các điều khoản Quy Chế Giao Dịch
								<?php echo $form->error($model,'acceptRule'); ?>
							</div>
						</div>		
				</fieldset>
				
				<div class="form-actions" style="margin-right: 45px;">
					<button type="submit" class="btn btn-large btn-primary">Đăng Ký</button>
					<button type="reset" class="btn btn-large">Hủy bỏ</button>
				</div>
			<?php $this->endWidget(); ?>					
			</div>

			<div id="member_login">
				Thong tin loi ich cua khach hang
			</div>
		</div>
	</div>
</div>

